/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tampilan;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.*;

/**
 *
 * @author sony
 */
public class FrameUtamaMahasiswa extends JFrame {

    private JMenuBar menubar;
    private JMenu mahasiswa;
    private JMenuItem daftaryudisium, exit;
//    private JLabel label;
 private JLabel background;

    public FrameUtamaMahasiswa() {


        this.setLayout(null);
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        this.setTitle("Panel Daftar Yudisium");

        background = new JLabel(new ImageIcon("LOGOUSD.jpg"));
        this.add(background);
        background.setBounds(0, 0, 800,500);
//      this.setResizable(true);
        menubar = new JMenuBar();
        this.setJMenuBar(menubar);



        mahasiswa = new JMenu("Mahasiswa");
        menubar.add(mahasiswa);

        daftaryudisium = new JMenuItem("Pendaftaran Yudisium");
        mahasiswa.add(daftaryudisium);
        daftaryudisium.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                JFrame testFrame = new JFrame();
                PanelDaftarYudisium testPanel = new PanelDaftarYudisium();
                testFrame.getContentPane().add(testPanel);
                testFrame.setSize(700, 600);
//                testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                testFrame.setVisible(true);
            }
        });

        exit = new JMenuItem("Exit");
        mahasiswa.add(exit);

        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        exit.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                quitAction();
            }

            private void quitAction() {
                System.exit(0);
            }
        });

    }

}
